class CropRenderer : public PlantRenderer
{
public:
	ITexture *Texture;

	CropRenderer(ITexture *texture) :
		PlantRenderer(texture, Point2i(0, 0))
	{
	}

	int GetTypeData(const int &data) { return 0; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		switch (block.ID)
		{
		case 59:
			TexturePosition = Point2i((8 + block.Data) * 16, 5 * 16);
			break;
		case 115:
			TexturePosition = Point2i((2 + (block.Data >= 2 ? block.Data - 1 : block.Data)) * 16, 14 * 16);
			break;
		case 141:
			{
				byte realData;

				switch (block.Data)
				{
				case 0:
				case 1:
					realData = 0;
					break;
				case 2:
				case 3:
					realData = 1;
					break;
				case 4:
				case 5:
				case 6:
					realData = 2;
					break;
				case 7:
					realData = 3;
					break;
				}

				TexturePosition = Point2i((8 + realData) * 16, 12 * 16);
			}
			break;
		case 142:
			{
				byte realData;

				switch (block.Data)
				{
				case 0:
				case 1:
					realData = 0;
					break;
				case 2:
				case 3:
					realData = 1;
					break;
				case 4:
				case 5:
				case 6:
					realData = 2;
					break;
				case 7:
					realData = 4;
					break;
				}

				TexturePosition = Point2i((8 + realData) * 16, 12 * 16);
			}
			break;
		}

		PlantRenderer::Render(schematic, renderer, block, position);
	}
};